package top.xierongsheng.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import top.xierongsheng.user.dto.groups.Create;
import top.xierongsheng.user.dto.groups.Update;
import top.xierongsheng.user.dto.groups.UpdateStatus;

import java.io.Serial;
import java.io.Serializable;
import jakarta.validation.constraints.*;

@Data
@Schema(description = "商品类型数据Dto")
@Accessors(chain = true)
public class GoodsTypeDto implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "商品类型ID")
    @NotBlank(message = "商品类型id不能为空", groups = {Update.class, UpdateStatus.class})
    private String id;

    @Schema(description = "商品类型名称")
    @NotBlank(message = "商品类型名称不能为空", groups = {Create.class,Update.class})
    private String name;

    @Schema(description = "商品类型描述")
    @NotBlank(message = "商品类型说明不能为空", groups = {Create.class,Update.class})
    private String description;

    @Schema(description = "商品类型状态")
    @NotNull(message = "商品类型状态不能为空", groups = {UpdateStatus.class})
    private int status;
}
